
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <link rel="stylesheet" type="text/css" href="{TEMPLATE_PATH}css/main.css" media="all" />
		<link rel="stylesheet" type="text/css" href="{TEMPLATE_PATH}css/dialog.css" media="all" />
		<script type="text/javascript" src="{TEMPLATE_PATH}js/jquery_min.js"></script>
		<script type="text/javascript" src="{TEMPLATE_PATH}js/dialog_min.js"></script>
		<script type="text/javascript" src="{TEMPLATE_PATH}js/main.js"></script>
		<script type="text/javascript" src="{TEMPLATE_PATH}js/mymain.js"></script>


		<title>登记信息</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
		<!-- Mobile Devices Support @begin -->
            <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
            <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
            <meta content="no-cache" http-equiv="pragma">
            <meta content="0" http-equiv="expires">
            <meta content="telephone=no, address=no" name="format-detection">
            <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
            <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
        <!-- Mobile Devices Support @end -->

    </head>
    <body onselectstart="return true;" ondragstart="return false;">
		<script>
			function submit1(){
				var form = document.getElementById("form1");
				var obj = {
					realname: form.realname.value,
					mobile: form.mobile.value,
										}
				if(obj.realname.length<2){
					alert("请输入姓名,不少于2个字符", 1500);
					return;
				}
				if(!obj.mobile){
					alert("请输入手机号", 1500);
					return;
				}
				if (!/^1[358]{1}[0-9]{9}/.test(obj.mobile)) {
					alert('请输入正确的手机号码！', 1500);
					return;
				}

				loading(true);
				$.ajax({
					url: "{php echo $this->createMobileUrl('register', array('rid' => $rid));}",
					type:"POST",
					data:$("#form1").serialize(),
					dataType:"json",
					success: function(res){
						loading(false);
						if(res.status == 1){
							alert(res.msg, 1500);
							//window.location.href = res.url;
							redirect(res.url,1500);
						}else{
							alert(res.msg, 1500);
							loading(false);
						}
					}
				});

			}
		</script>
		<div class="container info_tx">
			<div class="body pt_10">
				<ul class="list_ul_card">
					<form id="form1" action="javascript:;" method="post">
						<li data-card>
							<header class="center">
								<label style="display:inline-block;"><span>&nbsp;</span>完善会员资料</label>
							</header>
							<div class="forms">
								<dl>
									<dt>姓 名： </dt>
									<dd><input type="text" name="realname" placeholder="请输入姓名"  value="{$profile['realname']}" maxlength="30"  class="input"/></dd>
								</dl>
								<dl>
									<dt>手 机：</dt>
									<dd><input type="tel" name="mobile" placeholder="请输入手机号码" value="{$profile['mobile']}" maxlength="30"  class="input"/></dd>
								</dl>

							</div>
						</li>
						<ul class="add_op">
							<li style="padding:10px 0 0;">
								<a href="javascript:submit1();" style="width:100%;">提&nbsp;&nbsp;&nbsp;交</a>
							</li>

						</ul>
					</form>
				</ul>
			</div>
			
			<footer>
				<nav class="nav">
					<ul class="box" style="height:40px;">
						<li><a href="" ><span style="font-size:20px" >&copy{$_W['account']['name']}</span></a></li>
					</ul>
				</nav>
			</footer>
			
		</div>
	</body>
<script type="text/javascript">
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
	WeixinJSBridge.call('hideToolbar');
});
</script>

</html>

